package com.itheima.item.client;

import com.itheima.item.pojo.GoodInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

@FeignClient(value = "item-service",fallback = ItemClientFallback.class)
public interface ItemClient {
    @GetMapping("item/findByPage/{pageNum}/{pageSize}")
    List<GoodInfo> findByPage(@PathVariable("pageNum") Integer pageNum,@PathVariable("pageSize") Integer pageSize);

    @GetMapping("item/count")
    Integer count();

    @GetMapping("item/findGoodsById/{id}")
     GoodInfo findGoodsById(@PathVariable("id")Long id);
}
